import { http } from "@/utils"

// 频道
export const getChannels = () => {
  return http.get('/channels')
}
// 登录
export const login = (data) => {
  return http.post('http://geek.itheima.net/v1_0/authorizations', data)
}
// 用户信息
export const userProfile = () => {
  return http.get('/user/profile')
}
// 编辑文章详情
export const getArticles = (id) => {
  return http.get(`/mp/articles/${id}`)
}
// 提交详情
export const submitArticles = (params) => {
  return http.post('/mp/articles?draft=false', params)
}
// 更新详情
export const updateArticles = (id, params) => {
  return http.put(`/mp/articles/${id}?draft=false`, params)
}